import request from '@/utils/request'

// 查询商品积分列表
export function listIntegralCommodity(query) {
  return request({
    url: '/member/integralCommodity/list',
    method: 'get',
    params: query
  })
}

// 查询商品积分详细
export function getIntegralCommodity(id) {
  return request({
    url: '/member/integralCommodity/' + id,
    method: 'get'
  })
}

// 新增商品积分
export function addIntegralCommodity(data) {
  return request({
    url: '/member/integralCommodity',
    method: 'post',
    data: data
  })
}

// 修改商品积分
export function updateIntegralCommodity(data) {
  return request({
    url: '/member/integralCommodity',
    method: 'put',
    data: data
  })
}

// 删除商品积分
export function delIntegralCommodity(id) {
  return request({
    url: '/member/integralCommodity/' + id,
    method: 'delete'
  })
}

// 导出商品积分
export function exportIntegralCommodity(query) {
  return request({
    url: '/member/integralCommodity/export',
    method: 'get',
    params: query
  })
}